package com.cbg.sys.entity;

import java.math.BigDecimal;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cbg.base.constant.Constant;
import com.cbg.base.core.SuperEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 座位价格表
 * </p>
 *
 * @author chenbing
 * @since 2018-12-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_seat_price")
public class SeatPrice extends SuperEntity<SeatPrice> {

    private static final long serialVersionUID = 1L;

    /**
     * 1号座价格
     */
    private BigDecimal oneWorth;

    /**
     * 2号座价格
     */
    private BigDecimal twoWorth;

    /**
     * 3号座价格
     */
    private BigDecimal threeWorth;

    /**
     * 4号座价格
     */
    private BigDecimal fourWorth;

    /**
     * 5号座价格
     */
    private BigDecimal fiveWorth;

    /**
     * 6号座价格
     */
    private BigDecimal sixWorth;

    /**
     * 时间区间头
     */
    private String headTime;

    /**
     * 时间区间尾
     */
    private String tailTime;

    /**
     *区间毫秒-head
     */
    private long headMsec;
    /**
     * 区间毫秒-tail
     */
    private long tailMsec;

    public long getHeadMsec() {
        return DateUtil.parse(this.getHeadTime(), Constant.FORMAT).getTime();
    }

    public long getTailMsec() {
        return DateUtil.parse(this.getTailTime(), Constant.FORMAT).getTime();
    }

    public static void main(String[] args) {
        long time = DateUtil.parse("24:00", Constant.FORMAT).getTime();
        System.out.println(time);
    }

    /**
     * 类型id
     */
    private String typeId;
}
